import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { CustomerCouponService } from './customer_coupon.service';
import { CreateCustomerCouponDto } from './dto/create-customer_coupon.dto';
import { UpdateCustomerCouponDto } from './dto/update-customer_coupon.dto';

@Controller('customer-coupon')
export class CustomerCouponController {
  constructor(private readonly customerCouponService: CustomerCouponService) {}

  @Post()
  create(@Body() createCustomerCouponDto: CreateCustomerCouponDto) {
    return this.customerCouponService.create(createCustomerCouponDto);
  }

  @Get()
  findAll() {
    return this.customerCouponService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.customerCouponService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateCustomerCouponDto: UpdateCustomerCouponDto) {
    return this.customerCouponService.update(+id, updateCustomerCouponDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.customerCouponService.remove(+id);
  }
}
